using UnityEngine;

public class PlayerState_棍花 : PlayerStateBase
{
	public PlayerState_棍花()
	{
		_Data_Player招式_系数 = MonoSingleton<MyDataManager>.Instance._Data_玩家招式._棍花;
	}

	public override void OnEnter()
	{
		F_创建攻击命中回调();
		_Mono._Is免疫远程 = true;
	}

	public override void OnExit()
	{
		_Mono._Is免疫远程 = false;
		_Mono._C_攻击判断._攻击命中回调 -= F_攻击命中回调;
	}

	public override void OnUpdate()
	{
		if (_Mono.F_PlayerMove(4f))
		{
			_Mono._Ani.Play("移动棍花");
		}
		else
		{
			_Mono._Ani.Play("棍花");
		}
		_Mono._Curr气力 -= _Data_Player招式_系数._棍势值 * Time.deltaTime;
		if (_Mono._Curr气力 <= 2f)
		{
			_Mono.ChangeState(StateType_Player.正常移动);
		}
		if (Input.GetKeyUp(KeyCode.O))
		{
			F_棍花Up();
		}
	}

	public override void F_棍花Up()
	{
		_Mono.ChangeState(StateType_Player.正常移动);
	}
}
